Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to CPU-side stroke encoding #368

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Switch to CPU-side stroke encoding #368

merged 2 commits into from
Oct 5, 2023

Conversation

raphlinus
Copy link
Contributor

Don't use GPU-side signed distance field rendering for strokes, but rather expand them on the CPU (using kurbo) during encoding, then render using fill.

This is a significant performance regression, but is on the critical path path for multisampled path rendering and stroke rework (#303).

Don't use GPU-side signed distance field rendering for strokes, but rather expand them on the CPU (using kurbo) during encoding, then render using fill.

This is a significant performance regression, but is on the critical path path for multisampled path rendering and stroke rework (#303).
@raphlinus
Copy link
Contributor Author

One cleanup that probably should be considered is getting rid of the is_fill parameter, as that will always be true now.

Copy link
Collaborator

@dfrg dfrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for doing the work to keep stroked glyph outlines functional.

Deferring is_fill removal makes sense for now. We’ll want to update path encoding to match whatever we do for linebender/kurbo#303 anyway so let’s do the work then.

@raphlinus
Copy link
Contributor Author

Thanks for the review. Agree on the is_fill question, I was thinking about that on my morning run. I'll merge the peniko PR then update this to point there.

Now that peniko#14 is merged, let's point to that rather than a PR in review.
@raphlinus raphlinus merged commit 34483eb into main Oct 5, 2023
4 checks passed
@raphlinus raphlinus deleted the kurbo_stroke2 branch October 5, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants